<header>
    <title>规格值{notempty name='list["spec_value"]'}修改 {else /}添加 {/notempty}</title>
</header>
{include file="public/header" /}
<br>
<fieldset class="layui-elem-field layui-field-title">
    <legend>规格名：<b>{$list.spec_name}</b></legend>
</fieldset>
<form class="layui-form" action="" method="post">
    <div class="layui-form-item">
        <label class="layui-form-label">规格值</label>
        <div class="layui-input-block">
            <input type="text" style="width: 200px" name="spec_value" {notempty name='list'} value="{$list.spec_value}" {/notempty}  required  lay-verify="required" placeholder="请输入规格值" autocomplete="off" class="layui-input">
        </div>
    </div>

    <input type="hidden" name="spec_id" value="{$list.id}">

    <div class="layui-form-item">
        <label class="layui-form-label">状态</label>
        <div class="layui-input-block">
            <input type="radio" name="status" value="0" title="启用" {notempty name='list'} {if $list['status']==0}checked=""{/if} {else /}checked=""{/notempty}>
            <input type="radio" name="status" value="1" title="未启用" {notempty name='list'} {if $list['status']==1}checked="" {/if} {else /} {/notempty} >
        </div>
    </div>


    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>

<script>
    //Demo
    layui.use('form', function(){
        var form = layui.form;

        //监听提交
        form.on('submit(formDemo)', function(data){
        });
    });
</script>
{include file="public/footer" /}